/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-06 17:18:37
 * @LastEditTime: 2024-07-21 19:19:19
 * @LastEditors: 赵大壮
 */
import DZServiceStaff from "@/views/员工管理/service/DZServiceStaff";
import { Component, Vue, Inject } from "vue-property-decorator";
import DZServiceReport from "../../service/DZServiceReport";

@Component({
    components: {}
})
export default class Index extends Vue {

    s_staff = new DZServiceStaff();

    s_report = new DZServiceReport();

    mounted() {
        this.s_report.net_list_all_company();
        this.s_report.net_list_report();
        this.action_list_staff_assess()
    }

    action_choise_company() {
        this.s_staff.list_staff = [];
        this.s_report.list_assess = [];
        this.s_report.assess_id = null;
        this.s_report.staff_id = null;
        if (this.s_report.company_id != '') {
            this.s_staff.company = this.s_report.company_id;
            this.s_staff.net_list_staff();
            this.s_report.net_list_assess_by_company();
        }
        this.s_report.net_list_report();
    }

    action_page_change(cur_page) {
        this.s_report.m_page_a.page = cur_page;
        this.s_report.net_list_staff_assess();
    }

    action_choise_date(data) {
        console.log("action_choise_date:::", data)
        if (data && data.length > 0) {
            this.s_report.startDate = data[0] / 1000;
            this.s_report.endDate = data[1] / 1000;
        } else {
            this.s_report.startDate = ""
            this.s_report.endDate = "";
        }
        this.action_list_staff_assess();
    }

    action_list_staff_assess() {
        this.s_report.net_list_staff_assess()
    }
    action_export_assess() {
        this.s_report.net_export_assess();
    }
}